﻿<%@ Page Title="酒店列表" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    Inherits="Wjtour.Web.Front.hotellist" %>


<%@ Import Namespace="Wjtour.Domain" %>
<%@ Import Namespace="Wjtour.Common" %>
<%@ Import Namespace="TongCheng.API.OpenAPI" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <!-[if IE 6]>
    <script language="javascript" src="js/DD_belatedPNG_0.0.8a-min.js"></script>
    <script src="/js/My97DatePicker/WdatePicker.js" type="text/javascript"></script>

    <script>
        DD_belatedPNG.fix('.articlelist,img');
    </script>
    <![endif]->
    
    <script language="javascript">
        $(document).ready(function () {
            $('#myTab a:first').tab('show');
            $('#myTab a').click(function (e) {
                e.preventDefault();
                $(this).tab('show');
            });

            $("#playimg .JQ-slide").Slide({
                effect: "scroolX",
                speed: "normal",
                timer: 2000
            });
        });
        // 搜索框切换
        var pagesearch = (function (i) {
            $('.st').css('display', 'none');
            $('.st' + i).css('display', 'block');
            var src = $('#searchtitle').attr('src');
            if (i == '0') {
                $(".hotelsel").hide();
                $('#searchtitle').attr('src', src.replace('10', '09'));
            } else {
                $(".hotelsel").show();
                $('#searchtitle').attr('src', src.replace('09', '10'));
            }
        });
        // 门票列表显隐
        var ticketclick = (function (obj) {
            var tbody = $(obj).parent().parent().parent().find('tbody');
            var classname = $(obj).attr('class');
            var newclass = 'ticketclose';
            var words = '收起所有房型';
            if (classname == 'ticketclose') {
                newclass = 'ticketopen';
                words = '展开所有房型';
                $(tbody).animate({ height: 'toggle' });
            } else {
                $(tbody).animate({ height: 'toggle' });
            }
            $(obj).removeClass();
            $(obj).addClass(newclass);
            $(obj).text(words);

        });
        $(function () {
            $('.day').focus(function () {
                WdatePicker();
            });

            $('.date').focus(function () {
                WdatePicker({ dateFmt: 'yyyy-MM-dd' });
            });
        })
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="content" runat="server">
    <!--页主体-->
    <div class="ipage">
        <div class="path tpath">您所在的位置：<a href="/">首页</a> &gt; 在线预订 &gt; 酒店预订 </div>
    </div>
    <div class="ipage" style="margin-top: 12px;">
        <div class="searchtab">
            <img src="css/images/title09.png" border="0" id="searchtitle" usemap="#Map" />
            <map name="Map" id="Map">
                <area shape="rect" coords="3,5,149,34" href="javascript:void(0);" onclick="pagesearch(0);" />
                <area shape="rect" onclick="pagesearch(1);" coords="151,4,297,46" href="javascript:void(0);" />
            </map>
            <div class="st0 st">
                <div class="scenicnames">
                    景点名称 &nbsp;
                    <asp:TextBox ID="txtSceneryName" runat="server" CssClass="" Width="197" />
                </div>
                <div class="scenicbtn">
                    <asp:Button ID="scenerySearch" runat="server" Text="搜索" />
                </div>
                <div class="hotscenic">
                    <span>热门景点推荐</span>
                    <a href="#">同里镇</a><a href="#">同里镇</a><a href="#">同里镇</a><a href="#">同里镇</a><a href="#">同里镇</a><a href="#">同里镇</a><a href="#">同里镇</a>
                </div>
            </div>
            <div class="st1 st">
                <div class="scenicnames">
                    入住日期 &nbsp;
                    <asp:TextBox ID="txtComeDate" runat="server" CssClass="startdate date" Width="197" />
                </div>
                <div class="scenicnames">
                    离店日期 &nbsp;
                    <asp:TextBox ID="txtLeaveDate" runat="server" CssClass="startdate date" Width="197" />
                </div>
                <div class="scenicnames">
                    酒店位置 &nbsp;
                    <asp:TextBox ID="txtLocation" runat="server" CssClass="" Width="197" />
                </div>
                <div class="scenicnames">
                    酒店名称 &nbsp;
                    <asp:TextBox ID="txtHotelName" runat="server" CssClass="" Width="197" />
                </div>
                <div class="scenicbtn">
                    <asp:Button ID="hotelSearch" runat="server" Text="搜索" />
                </div>

            </div>
        </div>


        <div id="playimg">
            <div class="JQ-slide">
                <ul class="JQ-slide-content">
                    <%if (_slides != null && _slides.Count > 0)
                      {
                          foreach (var item in _slides)
                          {
                    %>
                    <li><a href="<%=item.url %>">
                        <img src="<%=item.img %>" alt="" /><span><%=item.title %></span></a></li>
                    <%}
                      } %>
                </ul>
                <ul class="JQ-slide-nav">
                    <%if (_slides != null && _slides.Count > 0)
                      {
                          string on = "";
                          for (var i = 0; i < _slides.Count; i++)
                          {
                              if (i == 0)
                              {
                                  on = "class=\"on\"";
                              }
                    %>
                    <li><%=(i+1) %></li>
                    <%}
                      } %>
                </ul>
            </div>
        </div>

        <div class="clear"></div>
    </div>

    <!--列表-->
    <div class="ipage scenicpage">
        <div class="hotelsel" style="display:none">
            <strong>酒店价格：</strong><a href="#" class="sel">全部</a><a href="#">￥150以下</a><a href="#">￥150 - ￥300</a><a href="#">￥300 - ￥500</a><a href="#">￥500 - ￥800</a><a href="#">￥800以上</a><br />
            <strong>酒店星级：</strong><a href="#" class="sel">全部</a><a href="#">五星级/豪华型</a><a href="#">四星级/高档型</a><a href="#">三星级/舒适型</a><a href="#">二星级/经济型</a>
        </div>
        <div class="scenicleft travelsleft ticketleft">
            <h2>酒店预订<span>共<font color="#0078B6"><%=list.totalCount %></font>个酒店符合条件</h2>
            <ul class="ticketlist">
                <%if (list.totalCount > 0)
                  {
                      for (var i = 0; i < list.Items.Count; i++)
                      {
                          var hotel = list.Items[i];
                %>
                <li>
                    <h3><a href="hotelview.aspx?id=<%=hotel.hotelId %>" target="_blank"><%=hotel.hotelName %></a><span></span></h3>
                    <a href="hotelview.aspx?id=<%=hotel.hotelId %>" target="_blank"><img src="http://Upload.17u.cn/hotel<%=hotel.img %>" /></a>
                    <div>
                        酒店等级：<%=hotel.starRated.starRatedName %><br />
                        酒店地址：<%=hotel.address %><br />
                        基本信息：<%=hotel.intro %>
                    </div>
                    <table class="tickettb">
                        <thead>
                            <tr>
                                <th width="204">房型</th>
                                <th width="121">网上均价</th>
                                <th width="81">早餐</th>
                                <th width="80">床型</th>
                                <th width="89">宽带</th>
                                <th width="75">&nbsp;</th>
                            </tr>
                        </thead>
                        <tfoot>
                            <tr>
                                <td colspan="6" class="ticketclose" onclick="ticketclick(this);">
                                收起所有房型</th>
                            </tr>
                        </tfoot>
                        <tbody>
                            <%if (hotelRoomsDic.ContainsKey(hotel.hotelId))
                              {
                                  var rooms = hotelRoomsDic[hotel.hotelId].Items;
                                  foreach (var roominfo in rooms)
                                  {
                                      var ad = string.Empty;
                                      switch (roominfo.adsl)
                                      {
                                          case "0":
                                              ad = "无";
                                              break;
                                          case "1":
                                              ad = "有(全免)";
                                              break;
                                          case "2":
                                              ad = "有(部免)";
                                              break;
                                          case "3":
                                              ad = "有(全收)";
                                              break;
                                          case "4":
                                              ad = "有(部收)";
                                              break;
                                          default:
                                              break;
                                      }

                                      var policy = roominfo.pricePolicyList.Items[0];
                            %>
                            <tr>
                                <td class="td1"><%=roominfo.roomName %></td>
                                <td class="td3">￥<%=policy.avgAmount %></td>
                                <td><%=roominfo.breakfast%></td>
                                <td><%=roominfo.bed%></td>
                                <td><%=ad %></td>
                                <td class="td5">
                                    <a href="http://www.17u.cn/Yuding1.aspx?HotelId=<%=hotel.hotelId %>&RoomTypeId=<%=roominfo.roomTypeId %>&ComeDate=<%=comeDate %>&LeaveDate=<%=leaveDate %>&HotelType=Normal&YudingCode=&PolicyId=<%=policy.policyId %>" target="_blank" class="reserve">预订</a>
                                </td>
                            </tr>
                            <%}
                              }%>
                        </tbody>
                    </table>
                </li>
                <%}
                  }%>
            </ul>
            <!-- 分页 -->
            <%=PagnationHtml %>
        </div>
        <!-- 侧面-->
        <div class="scenicright travelsright" style="margin-top: -92px;">
            <img src="css/images/linecommend.png" />
            <div class="title"></div>
            <ul class="arlist">
                <%if (recommendLines != null && recommendLines.Count > 0)
                  {
                      for (var i = 0; i < recommendLines.Count; i++)
                      {
                          var line = recommendLines[i];
                %>

                <li><span></span><a href="traveldetail.aspx?id=<%=line.id %>" target="_blank"><%=line.title %></a></li>
                <%}
                  }%>
            </ul>

            <img src="css/images/guide.png" class="guide" />

            <h5>
                <img src="css/images/travelguide.png" />
                <span><a href="travelguide.aspx">MORE</a></span>
            </h5>
            <div class="title"></div>
            <%if (trafficGuides != null && trafficGuides.Count > 0)
              {
                  var first = trafficGuides.First();
            %>
            <div class="best">
                <%if (!string.IsNullOrEmpty(first.img))
                  { %>
                <img src="<%=first.img %>" />
                <%}
                  else
                  { %>
                <img src="css/images/tmp13.png" />
                <%} %>
                <div>
                    <h4><a href="traveldetail.aspx?id=<%=first.id %>" target="_blank"><%=first.title %></a></h4>
                    <span>作者：<%=first.author %></span>
                    <span class="goodnum">赞：<%=first.zan %></span>
                    <span class="readnum">浏览：<%=first.hits %></span>
                </div>
            </div>
            <ul class="arlist">
                <%for (var i = 1; i < trafficGuides.Count; i++)
                  {
                      var tg = trafficGuides[i];
                %>
                <li><span></span><a href="travelguideview.aspx?id=<%=tg.id %>" target="_blank"><%=tg.title %></a></li>
                <%} %>
            </ul>
            <%} %>
            <img src="css/images/travelboxtitle.png" style="margin-top: 15px;" />
            <div class="travelboxinpage">
                <div class="tblist">
                    <a href="http://www.17u.cn/scenery/" target="_blank">
                        <img src="css/images/tb31a.png" /></a>
                    <a href="http://bus.17u.cn/" target="_blank">
                        <img src="css/images/tb32b.png" /></a>
                    <a href="http://www.114best.com/tel/" target="_blank">
                        <img src="css/images/tb33a.png" /></a>
                    <a href="http://www.sqk.com.cn/index.asp" target="_blank">
                        <img src="css/images/tb34a.png" /></a>
                    <a href="http://www.17u.cn/tianqi/" target="_blank">
                        <img src="css/images/tb35a.png" /></a>
                    <a href="http://www.17u.cn/flight/flightyuyue.aspx" target="_blank">
                        <img src="css/images/tb36a.png" /></a>
                </div>
                <div class="magz">
                    <%if (LatestMagazine != null)
                      {
                          if (!string.IsNullOrEmpty(LatestMagazine.logo))
                          {%>
                    <img src="<%=LatestMagazine.logo %>" style="width: 81px; height: 100px;" />
                    <%} %>
                    <div>
                        <h6>电子杂志<span>[<a href="downloadmag.aspx">全部</a>]</span></h6>
                        <span><%=Utility.CutString(Utility.StripHtml(LatestMagazine.introduce),10,false) %></span>
                        <input type="button" value=" " onclick="down('<%=LatestMagazine.pdfpath %>    ')" />
                    </div>
                    <%} %>
                </div>
                <div class="clear"></div>
            </div>
            <img src="css/images/travelboxbottom.png" />

        </div>
        <div class="clear"></div>
    </div>
</asp:Content>
